package Communication;

import Server.ClientList;
import java.io.Serializable;
import java.util.LinkedList;

/**
 *
 * Class description goes here.
 *
 * @author Kamil Gajowy
 */
public class S2ModulePacket implements Serializable {

    private int currentDirection;
    private int currentFloor;
    private int ID;
    private int lastDoneTaskID;

    /**
     * For LIFT module. If receiver is TypeGUI, it would be null!
     */
    private LinkedList<TaskForModule> taskList;

    /**
     * For GUI module. If receiver is TypeLift, it would be null!
     */
    private ClientList clientList;

    /**
     * 
     * @param id
     * @param currentDirection
     * @param currentFloor
     * @param taskList
     * @param clientList
     * @param lastDoneTask 
     */
    public S2ModulePacket(
            int id,
            int currentDirection,
            int currentFloor,
            LinkedList<TaskForModule> taskList,
            ClientList clientList,
            int lastDoneTask) {
        this.ID = id;
        this.currentDirection = currentDirection;
        this.currentFloor = currentFloor;
        this.taskList = taskList;
        this.clientList = clientList;
        this.lastDoneTaskID = lastDoneTask;
    }

    /**
     * Get the value of currentFloor
     *
     * @return the value of currentFloor
     */
    public int getCurrentFloor() {
        return currentFloor;
    }

    /**
     * Get the value of currentDirection
     *
     * @return the value of currentDirection
     */
    public int getCurrentDirection() {
        return currentDirection;
    }

    /**
     * @return the taskList
     */
    public LinkedList<TaskForModule> getTaskList() {
        return taskList;
    }

    /**
     * @return the clientList
     */
    public ClientList getClientList() {
        return clientList;
    }

    /**
     * @return the ID
     */
    public int getID() {
        return ID;
    }

    /**
     * @return the lastDoneTaskID
     */
    public int getLastDoneTaskID() {
        return lastDoneTaskID;
    }

}//end class
